


	package gui;

	import java.awt.event.MouseEvent;
	import java.awt.event.MouseListener;

	import javax.swing.ImageIcon;
	import javax.swing.JFrame;
	import javax.swing.JLabel;

	import common.MyButton;
	import common.MyLabel;

	public class DialogConfirmError extends JFrame {
		private FrameMain f = null;
		
		private MyLabel label = new MyLabel(new ImageIcon("./image/dialogConfirmError.png"));
		
		private MyButton ok = new MyButton(new ImageIcon("./image/ok.png"));
		private String errorMessage = "Calculation unsuccesful due to unknow reasons!";
		JLabel message = new JLabel(errorMessage);
		
		
		public DialogConfirmError(FrameMain frameMain) {
			f = frameMain;
			
			setSize(451, 220);
			setResizable(false);
			
			label.setBounds(0, 0, 451, 220);
			// label.setLayout(new BoxLayout(label,BoxLayout.Y_AXIS));
			message.setBounds(90, 65, 451, 25);
			
			ok.setBounds(150, 120, 154, 52);
			
			// text2.setBounds(x, y, width, height);
			label.add(message);
			
			label.add(ok);
			
			this.add(label);
			MouseListener listenerOk = new MouseListener() {
				public void mouseEntered(MouseEvent e) {
				}

				public void mouseClicked(MouseEvent arg0) {
					f.getDialogConfirmError().setVisible(false);
				}

				public void mouseExited(MouseEvent arg0) {
				}

				public void mousePressed(MouseEvent arg0) {
				}

				public void mouseReleased(MouseEvent arg0) {
				}
			};
			ok.addMouseListener(listenerOk);
		}
		
	}



